#include "demo_client.h"

DemoClient::DemoClient() { m_client = CreateTCPClientInstance(this); }

DemoClient::~DemoClient() {}

void DemoClient::Init() { m_client->ConnectServer("127.0.0.1", 4000); }

void DemoClient::OnConnectServer(int nStatus) {
  std::cout << " OnConnectServer:" << nStatus << std::endl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
int main() {
  DemoClient client;
  client.Init();

  for (;;) {
    std::cout << "-" << std::endl;
    ::sleep(1);
    std::cout << "+" << std::endl;
  }

  return 0;
}